<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #div1{
            height: 700px;
            background-color: darkgray;
        }
        .divcommon{
            width: 100px;
            height: 100px;
            margin: 10px;
        }
        #div2{
            background-color: aqua;
            position: relative;
            left: 0;
            /* 指定要执行的属性 */
            /* all 表示所有的属性 */
            transition-property: left;
            /* 动画执行的时间 */
            transition-duration: 1s;
        }
        #div2:hover{
            left: 800px;
        }
        #div3{
            background-color: tomato;
            margin-left: 0;
            transition: margin-left 1s;
            /* 加速运动 */
            transition-timing-function: ease-in-out;
            
        }
        #div1:hover #div3{
            margin-left: 500px;
        }
        #div4{
            margin-left: 0;
            background-color: yellowgreen;
            transition: margin-left 1s;
            /* 分步执行 */
            transition-timing-function: steps(2);
        }
        #div1:hover #div4{
            margin-left: 600px;
        }
    </style>
</head>
<body>
    <!-- 动画练习 -->
    <div id="div1">
        <div id="div2" class="divcommon"></div>
        <div id="div3" class="divcommon"></div>
        <div id="div4" class="divcommon"></div>
    </div>
</body>
</html>